home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / comms / amiga report / ararchive / install_ararchive < prev    next >
Text File  |  1995-04-12  |  5KB  |  167 lines

  1. ;
  2. ; Install For ARArchive ©1995 Robert Reiswig
  3. ; $Id: ARArchive  1.5 
  4. ;
  5. (set osver (/ (getversion "LIBS:version.library") 65536))
  6. ( if (= osver 37) ( (set workbench "2.0")) ( if (= osver 38) ( (set workbench "2.1"))
  7. ( if (= osver 39) ( (set workbench "3.0")) ( if (= osver 40) ( (set workbench "3.1"))
  8. ( if (= osver 41) ( (set workbench "4.0")) )))))
  9.  
  10. ( if (= osver 37) ( (set DefCpu 0)) ( if (= osver 38) ( (set DefCpu 1))
  11. ( if (= osver 39) ( (set DefCpu 2)) ( if (= osver 40) ( (set DefCpu 3))
  12. ( if (= osver 41) ( (set DefCpu 4)) )))))
  13.  
  14.  
  15. (if (< osver 37)  (abort "Sorry You need 2.0 or higher to run ARArchiver!") )
  16.  
  17. (message "ARArchive V1.3.08\n\nBy: Robert Reiswig\nrcr@netcom.com\n\n"
  18.          "This Installer will do a few things:\n\nCopy ARArchive to where you tell it."
  19.          "\nAdd an AR: assign to your User-Startup.\n "
  20.          "Create a 'C:ARA' script for ARArchive-XXX\n(If selected)"
  21.  
  22.  
  23.  
  24.  
  25. (set How  (askchoice (choices "In LHA format (ie: ar301.lha)" "In LZX format (ie: ar301.lzx)" "In Uncompressed format (ie: ar301.guide)")
  26.                      (prompt "How do you store your Amiga Reports?")
  27.                  (help   "How do you store your Amiga Reports?")
  28.                      (default 0)
  29.       )
  30. )
  31.  
  32.  
  33. (if (= How 0) (set HowText "ARArchive-LHA") )
  34. (if (= How 1) (set HowText "ARArchive-LZX") )
  35. (if (= How 2) (set HowText "ARArchive") )
  36.  
  37.  
  38.  
  39.  
  40. (set ARA_dest
  41.         
  42.            (askdir
  43.                    (prompt (cat "Where do you wish to install:\n" HowText))
  44.                    (help @askdir-help)
  45.                    (default @default-dest)
  46.                    
  47.            )
  48.                 
  49.         
  50. )
  51.  
  52.  
  53. (set @default-dest ARA_dest) 
  54.  
  55.  
  56. (if (= How 0) (set HowCompress "LHA'ed") )
  57. (if (= How 1) (set HowCompress "LZX'ed") )
  58. (if (= How 2) (set HowCompress "Uncompressed (AmigaGuide)") )
  59.  
  60. (set AR_dest
  61.      
  62.                 (askdir
  63.                         (prompt (cat "In which drawer are the\n*" HowCompress "* Amiga Reports\nstored?"))
  64.                         (help @askdir-help)
  65.                         (default @default-dest)
  66.                 )
  67.                 
  68. )
  69.  
  70.  
  71. (set DoThis (cat "ASSIGN AR: " AR_dest))
  72. (run (DoThis))
  73.  
  74.  
  75.  
  76. (if (= How 0) (set HowCompress "LHA") )
  77. (if (= How 1) (set HowCompress "LZX") )
  78. (if (= How 2) (set HowCompress "Uncompressed (AmigaGuide)") )
  79.  
  80.  
  81. (if (= How 0) (copyfiles (source "ARArchive-LHA") (dest ARA_dest) (infos) ))
  82. (if (= How 1) (copyfiles (source "ARArchive-LZX") (dest ARA_dest) (infos) ))
  83. (if (= How 2) (copyfiles (source "ARArchive") (dest ARA_dest) (infos) ))
  84.  
  85.  
  86. (if (< How 2)
  87.   (
  88.      (message (cat "\n\n\n\nNOTE\n~~~~~~~~~~~~~\nYou must be running AREXX and have " HowCompress
  89.                    " in the command path to use ARArchive!"))
  90.     
  91.  
  92.      (set osverS (askchoice (choices "2.0" "2.1" "3.0" "3.1")
  93.                      (prompt "Please Select the OS Version you are running. "
  94.                              "This will be the Machine you will install ARArchive on. "
  95.                              "This is needed to tell the ARexx script to use AmigaGuide or Multiview. "
  96.                              "The Installer has found\n" workbench " version of the OS." )
  97.                  (help   "Select OS Ver")
  98.                      (default DefCpu)
  99.              )
  100.      )
  101.      
  102.  
  103.      (if (< osverS 3) (set AGViewer "SYS:Utilities/AmigaGuide") )
  104.      (if (> osverS 2) (set AGViewer "SYS:Utilities/Multiview") )
  105.  
  106.      (delete "c:ARA")
  107.  
  108.      (if (= How 0) (set UCC "lha -q x"))
  109.      (if (= How 1) (set UCC "lzx -q -m x"))
  110.      
  111.      (textfile (dest (tackon "c:" "ARA"))
  112.                (append "/* ARA-UnCompress Robert Reiswig V1.1   rcr@netcom.com */\n")
  113.                (append "ADDRESS COMMAND\n")
  114.                (append "parse arg ARfilePath ARfile\n")
  115.                (append " \n")
  116.                (append "/* Clean names off */\n")
  117.                (append "ARfilePath = Strip(ARfilePath,'B')\n")
  118.                (append "ARfile = Strip(ARfile,'B') \n")
  119.                (append " \n")   
  120.                (append "/* Set UnCompress command , AmigaGuide Viewer, where to Uncompress */\n")
  121.                (append "Where = \"T:\"\n")
  122.                (append "UnCompressCommand = \"" UCC "\"\n") 
  123.                (append (cat "GuideViewer = \"" AGViewer "\"\n"))
  124.                (append " \n")
  125.                (append "/* Do Its thing, Unpack , display , delete */\n")
  126.                (append "UnCompressCommand || ' ' || ARfilePath || ' ' || Where \n")
  127.                (append "GuideViewer || ' ' || Where || ARFile \n")
  128.                (append "'delete >nil: ' || Where || 'AR#?'\n")
  129.                (append " \n")
  130.                
  131.      )
  132.  
  133.   )
  134. )
  135.  
  136. (if (= How 0) (set filename "ARArchive-LHA"))
  137. (if (= How 1) (set filename "ARArchive-LZX"))
  138. (if (= How 2) (set filename "ARArchive"))
  139.        
  140.  
  141. (if (< osverS 3)
  142.  ( 
  143.    (tooltype (prompt "Setting Tooltypes")
  144.         (help   "Setting Tooltypes")
  145.             (dest   (tackon ARA_dest filename))
  146.             (setdefaulttool "AmigaGuide")
  147.    )
  148.  )
  149.  
  150.  
  151. (startup "ARArchive"
  152.           (prompt "Adding an ASSIGN to your S:User-startup.")
  153.           (command (DoThis))
  154.           (help
  155.                   "\nIn order for ARArchive to find the Amiga Reports"
  156.                   "an assign must be made for AR:"
  157.           )
  158. )
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.